package org.road0329.dlt698.axdr;

import org.road0329.dlt698.asn1.axdr.AxdrOctetString;

import java.util.Arrays;

public class Float64 extends AxdrOctetString {
    private static final int LENGTH = 8;
    private byte[] octetString = new byte[LENGTH];

    public Float64() {
        // Set the length of the octet string to LENGTH
        Arrays.fill(octetString, (byte) 0);
    }

    public void setAll(byte[] octetString) {
        if (octetString.length == LENGTH) {
            this.octetString = Arrays.copyOf(octetString, LENGTH);
        } else {
            throw new IllegalArgumentException("OctetString must be exactly " + LENGTH + " bytes long.");
        }
    }
}

